import api from "../../../api/index";
export default {
  state:{
    loading:true,
    tableData:[]
  },
  getters:{
  },
  mutations:{
    retained_tableData(state,data){
      state.tableData = data;
    },
    retained_showLoading(state){
      state.loading = true;
    },
    retained_endLoading(state){
      state.loading = false;
    }
  },
  actions:{
    retained_tableData(context,{set,...para}){
      context.commit('retained_showLoading');
      api.getRemainList(para,set)
        .then((response) =>{
          context.commit('retained_tableData',response.data);
          context.commit('retained_endLoading');
        })
        .catch((error)=> {
          console.log(error);
        });
    }
  }
}
